<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function getQueryParam(param) {
        const urlParams = new URLSearchParams(window.location.search);
        return urlParams.get(param);
      }
      const item = getQueryParam("item");
      document.addEventListener("DOMContentLoaded", function () {
        document.getElementById("cartItem").textContent =
          `Congratulations, you have 1 ${item} in your cart`;
      });
    </script>
    <div id="cartItem"></div>
  </body>
</html>
